
;; See this:
;; https://www.dandwiki.com/wiki/Well_Over_100_Tavern_Names_(DnD_Other)

(import (scheme base)
        (scheme read)
        (scheme write)
        (srfi 27))

(random-source-randomize! default-random-source)

(define (list-random l)
  (list-ref l (random-integer (length l))))

(define (select-tavern-type)
  (list-random
   ;; 0 noun
   ;; 1 adjective
   ;; 2 title
   ;; 3 "The"
   ;; 4 "&"
   '((1 0)
     (1 0 2)
     (3 1 0)
     (3 1 0 2)
     (0 4 0)
     (0 4 0 2)
     (3 0 4 0)
     (3 0 4 0 2)
     (1 2)
     (3 1 2))))

(define (select-noun)
  (list-random
   '("Dog" "Wolf" "Fox" "Pul" "Cat" "Lion" "Tiger" "Kitten"
     "Ox" "Cow" "Sow" "Bull" "Calf" "Horse" "Stallion"
     "Mare" "Foal" "Owl" "Eagle" "Falcon" "Hawk" "Raven"
     "Crow" "Gull" "Fish" "Whale" "Shark" "Octopus" "Squid"
     "Goat" "Sheep" "Ewe" "Fly" "Butterfly" "Dragonfly"
     "Beetle" "Ant" "Wasp" "Termite" "Louse" "Worm" "Lizard"
     "Frog" "Toad" "Snake" "Chameleon" "Unicorn" "Gryphon"
     "Dragon" "Wyvern" "Roc" "Clam" "Oyster" "Starfish"
     "Slug" "Snail" "Mouse" "Rat" "Beaver" "Marten" "Mink"
     "Otter" "Seal" "Manatee" "Chipmunk" "Squirrel" "Gopher"
     "Tower" "Castle" "Dagger" "Sword" "Bow" "Arrow" "Hat"
     "Boot" "Trophy" "Goose" "Duck" "Boat" "Ship" "River"
     "Falls" "Forest" "Mountain" "Vampire" "Skeleton"
     "Witch" "Wench" "Lady" "Lord" "Knight" "Page" "Drunk"
     "Shield" "Wand" "Helm" "Flask" "Flagon" "Pint" "Shot")))

(define (select-adjective)
  (list-random
   '("Red" "Orange" "Yellow" "Green" "Blue" "Purple"
     "Sanguine" "Sepia" "Ochre" "Puce" "Navy" "Maroon" "Pink"
     "Peach" "Cyan" "Violet" "Brown" "Black" "Gray" "White"
     "Silver" "Gold" "Jumping" "Sleeping" "Running" "Rolling"
     "Laughing" "Singing" "Flying" "Burning" "Swimming"
     "Crying" "Roaring" "Screaming" "Silent" "Petrified"
     "Hiding" "Hidden" "Lost" "Forgotten" "Shiny" "Drowning"
     "Giant" "Tiny" "Fat" "Skinny" "Humorous" "Lonely"
     "Drunken" "Slimy" "Undead" "Dark" "Bright" "Magical"
     "Enchanted" "Poor" "Wealthy" "Lucky" "Unfortunate"
     "Angry" "Happy" "Sad" "Thieving" "Desperate" "Divine"
     "Arcane" "Profane" "Discrete" "Buried" "False" "Foolish"
     "Flatulent" "Hypnotic" "Haunted" "Special" "Fun" "Drab"
     "Daring" "Stubborn" "Sober" "Talking" "Naked" "Suffering"
     "Cheap" "Smelly" "Easy" "Heroic" "Hovering" "Married"
     "Pious" "Pompous" "Illegal" "Sacred" "Defiled" "Spoilt"
     "Wooden" "Bloody" "Yawning" "Sleepy" "Hungry")))

(define (select-title)
  (list-random
   '("Bar" "Mead House" "Speakeasy" "Pub" "Brewery"
     "Loft" "Club" "Inn" "Tavern" "Den" "Lodge")))

(define (select-the)
  "The")

(define (select-amp)
  "&")

(define (select-tavern)
  (define procs (list select-noun
                      select-adjective
                      select-title
                      select-the
                      select-amp))
  (apply string-append
         (map (lambda (i) (string-append ((list-ref procs i))
                                         " "))
              (select-tavern-type))))

